]> dgit.raspbian.org Git - gnome-shell.git/commit
st/icon-theme: Fix transparent colors in symbolic SVGs
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 5 Apr 2023 14:02:29 +0000 (16:02 +0200)
committerMarge Bot <marge-bot@gnome.org>
Wed, 5 Apr 2023 18:55:56 +0000 (18:55 +0000)
commit1ca5fc7de1a925cc830c35d0c9ae0abd9a0d3572
tree9d9319299b81bebf1ed6640eeb3b2961ca871414
parent8431e7ae51fb9007a815f8e72592df529ce44ba3
st/icon-theme: Fix transparent colors in symbolic SVGs

When loading a symbolic SVG, the original file is wrapped in
a header that includes a generated stylesheet with the
appropriate colors, plus an overall opacity.

The opacity value is clamped to values between 0 and 1, which
directly matched the alpha field of the GdkRGBA type. However
since we moved to StIconColors/ClutterColor, the alpha field
is now in the range [0..255], any alpha value other than 0 now
results in full opacity.

To fix, translate the [0..255] integer into a [0..1] double
before using it as opacity.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2731>
src/st/st-icon-theme.c